package com.shishuo.cms.service;

import java.util.Date;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import com.shishuo.cms.dao.GoodsInfoDao;
import com.shishuo.cms.entity.GoodsInfo;

@Service
public class GoodsInfoService {
	@Autowired
	private GoodsInfoDao goodsInfoDao;
	@CacheEvict(value = "goodsInfo", allEntries = true)
	public GoodsInfo addGoodsInfo(GoodsInfo goodsInfo) throws Exception {
		goodsInfo.setGoodsCreateDate(new Date());
		goodsInfoDao.addGoodsInfo(goodsInfo);
		return goodsInfo;
	}
}
